Package-level declarations

Types

Link copied to clipboard
typealias CorrelationId = Long
Link copied to clipboard
typealias EntitySid = String
Link copied to clipboard
typealias EventType = String
Link copied to clipboard
interface SyncIterator<T>

An iterator over a collection. Allows to sequentially access the elements. Must be closed at the end to cleanup resources.

Functions

Link copied to clipboard
inline suspend fun <T : Any> SyncList.addItem(itemData: T): SyncList.Item

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and adds it as a new item to the end of the SyncList.

Link copied to clipboard
inline suspend fun <T : Any> SyncList.addItemWithTtl(itemData: T, ttl: <Error class: unknown class>): SyncList.Item

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and adds it as a new item to the end of the SyncList with a specified TTL.

Link copied to clipboard
inline suspend fun <T : Any> Lists.addListItem(listSidOrUniqueName: String, itemData: T): SyncList.Item

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and adds it as a new item to the end of the specified SyncList.

Link copied to clipboard
inline suspend fun <T : Any> Lists.addListItemWithTtl(listSidOrUniqueName: String, itemData: T, ttl: <Error class: unknown class>): SyncList.Item

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and adds it as a new item to the end of the specified SyncList with a specified TTL.

Link copied to clipboard
fun <T> SyncIterator<T>.asFlow(): <Error class: unknown class>
Link copied to clipboard
inline fun <T : Any> SyncDocument.data(): T

Deserializes the SyncDocument.data into a value of type T using a deserializer retrieved from reified type parameter.

inline fun <T : Any> SyncList.Item.data(): T

Deserializes the SyncList.Item.data into a value of type T using a deserializer retrieved from reified type parameter.

inline fun <T : Any> SyncMap.Item.data(): T

Deserializes the SyncMap.Item.data into a value of type T using a deserializer retrieved from reified type parameter.

inline fun <T : Any> SyncStream.Message.data(): T

Deserializes the SyncStream.Message.data into a value of type T using a deserializer retrieved from reified type parameter.

Link copied to clipboard
inline suspend fun <T> SyncIterator<T>.forEach(block: (T) -> Unit)
Link copied to clipboard
inline suspend fun <T : Any> SyncDocument.mutateData(crossinline mutator: suspend (currentData: T) -> T?)

Serializes the value returned by Mutator function into an equivalent JsonObject using a serializer retrieved from reified type parameter and uses the JsonObject to mutate value of the SyncDocument

Link copied to clipboard
inline suspend fun <T : Any> SyncDocument.mutateDataWithTtl(ttl: <Error class: unknown class>, crossinline mutator: suspend (currentData: T) -> T?)

Serializes the value returned by Mutator function into an equivalent JsonObject using a serializer retrieved from reified type parameter and uses the JsonObject to mutate value of the SyncDocument

Link copied to clipboard
inline suspend fun <T : Any> Documents.mutateDocument(sidOrUniqueName: String, crossinline mutator: suspend (currentData: T) -> T?): T

Serializes the value returned by Mutator function into an equivalent JsonObject using a serializer retrieved from reified type parameter and uses the JsonObject to mutate value of the SyncDocument without opening the document.

Link copied to clipboard
inline suspend fun <T> Documents.mutateDocumentWithTtl(sidOrUniqueName: String, ttl: <Error class: unknown class>, crossinline mutator: suspend (currentData: T) -> T?): T

Serializes the value returned by Mutator function into an equivalent JsonObject using a serializer retrieved from reified type parameter and uses the JsonObject to mutate value of the SyncDocument without opening the document.

Link copied to clipboard
inline suspend fun <T : Any> SyncList.mutateItem(itemIndex: Long, crossinline mutator: suspend (currentData: T) -> T?): SyncList.Item

Serializes the value returned by Mutator function into an equivalent JsonObject using a serializer retrieved from reified type parameter and uses the JsonObject to mutate value of the SyncList.Item

inline suspend fun <T : Any> SyncMap.mutateItem(itemKey: String, crossinline mutator: suspend (currentData: T?) -> T?): SyncMap.Item

Serializes the value returned by Mutator function into an equivalent JsonObject using a serializer retrieved from reified type parameter and uses the JsonObject to mutate value of the SyncMap.Item

Link copied to clipboard
inline suspend fun <T : Any> SyncList.mutateItemWithTtl(itemIndex: Long, ttl: <Error class: unknown class>, crossinline mutator: suspend (currentData: T) -> T?): SyncList.Item

Serializes the value returned by Mutator function into an equivalent JsonObject using a serializer retrieved from reified type parameter and uses the JsonObject to mutate value of the SyncList.Item

inline suspend fun <T : Any> SyncMap.mutateItemWithTtl(itemKey: String, ttl: <Error class: unknown class>, crossinline mutator: suspend (currentData: T?) -> T?): SyncMap.Item

Serializes the value returned by Mutator function into an equivalent JsonObject using a serializer retrieved from reified type parameter and uses the JsonObject to mutate value of the SyncMap.Item

Link copied to clipboard
inline suspend fun <T : Any> Lists.mutateListItem(listSidOrUniqueName: String, itemIndex: Long, crossinline mutator: suspend (currentData: T) -> T?): SyncList.Item

Serializes the value returned by Mutator function into an equivalent JsonObject using a serializer retrieved from reified type parameter and uses the JsonObject to mutate value of the SyncList.Item

Link copied to clipboard
inline suspend fun <T : Any> Lists.mutateListItemWithTtl(listSidOrUniqueName: String, itemIndex: Long, ttl: <Error class: unknown class>, crossinline mutator: suspend (currentData: T) -> T?): SyncList.Item

Serializes the value returned by Mutator function into an equivalent JsonObject using a serializer retrieved from reified type parameter and uses the JsonObject to mutate value of the SyncList.Item

Link copied to clipboard
inline suspend fun <T : Any> Maps.mutateMapItem(mapSidOrUniqueName: String, itemKey: String, crossinline mutator: suspend (currentData: T?) -> T?): SyncMap.Item

Serializes the value returned by Mutator function into an equivalent JsonObject using a serializer retrieved from reified type parameter and uses the JsonObject to mutate value of the SyncMap.Item without opening the map.

Link copied to clipboard
inline suspend fun <T> Maps.mutateMapItemWithTtl(mapSidOrUniqueName: String, itemKey: String, ttl: <Error class: unknown class>, crossinline mutator: suspend (currentData: T?) -> T?): SyncMap.Item

Serializes the value returned by Mutator function into an equivalent JsonObject using a serializer retrieved from reified type parameter and uses the JsonObject to mutate value of the SyncMap.Item without opening the map.

Link copied to clipboard
inline suspend fun <T : Any> SyncStream.publishMessage(data: T): SyncStream.Message

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and publish it as a new message to this SyncStream.

inline suspend fun <T : Any> Streams.publishMessage(sidOrUniqueName: String, data: T): SyncStream.Message

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and publish it as a new message to this SyncStream without opening it.

Link copied to clipboard
inline suspend fun <T : Any> SyncDocument.setData(data: T)

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and set it as value of the SyncDocument.

Link copied to clipboard
inline suspend fun <T : Any> SyncDocument.setDataWithTtl(data: T, ttl: <Error class: unknown class>)

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and set it as value of the SyncDocument.

Link copied to clipboard
inline suspend fun <T : Any> SyncList.setItem(itemIndex: Long, itemData: T): SyncList.Item

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and set it as value of the SyncList.Item.

inline suspend fun <T : Any> SyncMap.setItem(itemKey: String, itemData: T): SyncMap.Item

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and set it as value of the SyncMap.Item.

Link copied to clipboard
inline suspend fun <T : Any> SyncMap.setItemWithTtl(itemKey: String, itemData: T, ttl: <Error class: unknown class>): SyncMap.Item

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and set it as value of the SyncMap.Item.

Link copied to clipboard
inline suspend fun <T : Any> Lists.setListItem(listSidOrUniqueName: String, itemIndex: Long, itemData: T): SyncList.Item

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and set it as value of the SyncList.Item.

Link copied to clipboard
inline suspend fun <T : Any> Lists.setListItemWithTtl(listSidOrUniqueName: String, itemIndex: Long, itemData: T, ttl: <Error class: unknown class>): SyncList.Item

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and set it as value of the SyncList.Item.

Link copied to clipboard
inline suspend fun <T : Any> Maps.setMapItem(mapSidOrUniqueName: String, itemKey: String, itemData: T): SyncMap.Item

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and set it as value of the SyncMap.Item without opening the map.

Link copied to clipboard
inline suspend fun <T : Any> Maps.setMapItemWithTtl(mapSidOrUniqueName: String, itemKey: String, itemData: T, ttl: <Error class: unknown class>): SyncMap.Item

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and set it as value of the SyncMap.Item without opening the map.

Link copied to clipboard
inline suspend fun <T : Any> Documents.updateDocument(sidOrUniqueName: String, data: T)

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and set it as value of the SyncDocument without opening the document.

Link copied to clipboard
inline suspend fun <T : Any> Documents.updateDocumentWithTtl(sidOrUniqueName: String, data: T, ttl: <Error class: unknown class>)

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and set it as value of the SyncDocument without opening the document.

Link copied to clipboard
inline fun <R> SyncClient.use(block: (SyncClient) -> R): R

Executes the given block function on SyncClient and then shuts it down correctly whether an exception is thrown or not.

inline fun <R> SyncDocument.use(block: (SyncDocument) -> R): R

Executes the given block function on SyncDocument and then closes it down correctly whether an exception is thrown or not.

inline fun <R> SyncList.use(block: (SyncList) -> R): R

Executes the given block function on SyncList and then closes it down correctly whether an exception is thrown or not.

inline fun <R> SyncMap.use(block: (SyncMap) -> R): R

Executes the given block function on SyncMap and then closes it down correctly whether an exception is thrown or not.

inline fun <R> SyncStream.use(block: (SyncStream) -> R): R

Executes the given block function on SyncStream and then closes it down correctly whether an exception is thrown or not.